1. Field
Aspects of the present invention generally relate to a communication device, a method for controlling a communication device, and a storage medium.
2. Description of the Related Art
In recent years, Wi-Fi Alliance has developed a standard, Wi-Fi Direct®. In Wi-Fi Direct®, a function (service discovery function) of advertising and searching service information supported by an upper layer application is defined as an option function. With the service discovery function, service information held by an electronic device as a connection destination can be acquired before executing connection processing. When the service information is acquired, information about a port used in the service can be also acquired, and communications can be performed through the port.
However, when the connection destination device does not have the service discovery function, the information about a port used in the service of the connection destination device cannot be acquired. Thus, communications cannot be performed through the port, thereby leading to low usability.
However, when all the ports are unlocked, an unintended device can establish the connection, thereby leading to a lower security.